// ==========================================================================
// gin-sns auto gen code.
// date：2021-02-21 13:45:54 +0800 CST
// path: app/model/module/thirdaccount/thirdaccount_entity.go
// author：jon
// ==========================================================================

package thirdaccount

import (
	"time"
)

// 数据表映射结构体
type Entity struct {
	Id         int64     `json:"id" xorm:"not null pk autoincr comment('') bigint(20)"`
	UserId     int64     `json:"user_id" xorm:"comment('用户id') bigint(20)"`
	Avatar     string    `json:"avatar" xorm:"comment('用户头像') varchar(1024)"`
	Nickname   string    `json:"nickname" xorm:"comment('用户昵称') varchar(32)"`
	ThirdType  string    `json:"third_type" xorm:"comment('帐号类型') varchar(32)"`
	ThirdId    string    `json:"third_id" xorm:"comment('帐号id') varchar(64)"`
	ExtraData  string    `json:"extra_data" xorm:"comment('扩展数据') longtext"`
	Status     int       `json:"status" xorm:"comment('0未审核 1正常状态 2审核未通过 3删除') tinyint(2)"`
	CreateTime time.Time `json:"create_time" xorm:"comment('创建时间') datetime"`
}

//新增页面请求参数
type AddReq struct {
	UserId    int64  `form:"userId" `
	Avatar    string `form:"avatar" `
	Nickname  string `form:"nickname" binding:"required"`
	ThirdType string `form:"thirdType" `
	ThirdId   string `form:"thirdId" `
	ExtraData string `form:"extraData" `
	Status    int    `form:"status" binding:"required"`
}

//修改页面请求参数
type EditReq struct {
	Id        int64  `form:"id" binding:"required"`
	UserId    int64  `form:"userId" `
	Avatar    string `form:"avatar" `
	Nickname  string `form:"nickname" binding:"required不能为空"`
	ThirdType string `form:"thirdType" `
	ThirdId   string `form:"thirdId" `
	ExtraData string `form:"extraData" `
	Status    int    `form:"status" binding:"required不能为空"`
}

//分页请求参数
type SelectPageReq struct {
	UserId    int64  `form:"userId"`    //用户id
	Avatar    string `form:"avatar"`    //用户头像
	Nickname  string `form:"nickname"`  //用户昵称
	ThirdType string `form:"thirdType"` //帐号类型
	ThirdId   string `form:"thirdId"`   //帐号id
	ExtraData string `form:"extraData"` //扩展数据
	Status    int    `form:"status"`    //0未审核 1正常状态 2审核未通过 3删除
	BeginTime string `form:"beginTime"` //开始时间
	EndTime   string `form:"endTime"`   //结束时间
	PageNum   int    `form:"pageNum"`   //当前页码
	PageSize  int    `form:"pageSize"`  //每页数
}
